package org.ncibi.cytoscape.metscape.network;

import org.ncibi.metab.network.MetabolicNetwork;
import org.ncibi.metab.network.edge.MetabolicEdge;
import org.ncibi.metab.network.node.MetabolicNode;

import cytoscape.CyNetwork;
import cytoscape.Cytoscape;

public class NullNetworkTranslator extends DefaultNetworkTranslator {

    private final MetabolicNetwork sourceNetwork;
    
    public NullNetworkTranslator(MetabolicNetwork sourceNetwork)
    {
    	super(null, sourceNetwork, null, null);
    	this.sourceNetwork = sourceNetwork;
    }

	@Override
	public CyNetwork toCytoscapeNetwork() {
		for (MetabolicNode node : sourceNetwork.getAllNodes())
        {
            getTranslatorForNode(node).toCyNode(node);
        }
		for (MetabolicEdge edge : sourceNetwork.getEdges())
        {
            getTranslatorForEdge(edge).toCyEdge(edge);
        }
        return Cytoscape.getNullNetwork();
	}

}
